<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery.min.js"></script>
</head>
<body>
    <div>惊喜</div>
    <div>惊喜</div>
    <div>惊喜</div>
    <div>惊喜</div>
    <ul>
        <li>相同</li>
        <li>相同</li>
        <li>相同</li>
    </ul>
<script>
    $(function(){
        $("ul li:first").css("background","red");
        $("div:eq(1)").css("background","red");
    })
</script>
</body>
</html>